﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="chaxun_laoshi.aspx.cs" Inherits="kecheng_chaxun_laoshi" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>无标题页</title>
    <link href="../style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">  
    <table style="width: 820px;margin-top:10px;" >
        <tr>     
            <td colspan="2">
                <asp:Label ID="Label3" runat="server" Height="24px" Text="选择机构：" Width="78px"></asp:Label><asp:DropDownList
                    ID="DropDownList1" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource1"
                    DataTextField="jigou" DataValueField="jigou" Width="254px" OnSelectedIndexChanged="DropDownList1_SelectedIndexChanged">
                </asp:DropDownList></td>
        </tr>
        <tr>  
            <td colspan="2">
                <asp:Label ID="Label1" runat="server" Height="24px" Text="选择老师：" Width="79px"></asp:Label><asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" DataSourceID="SqlDataSource2"
                    DataTextField="username1" DataValueField="id" Width="134px">
                </asp:DropDownList></td>
        </tr>
        <tr>    
            <td style="width:820px; height: 105px;" colspan="2">
				<asp:Label ID="Label2" runat="server" Text="    "></asp:Label>
                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" DataSourceID="SqlDataSource3"
                    Height="50px" Width="820px" BorderWidth=0 class="border_det">
                    <Fields>
                        <asp:BoundField DataField="username1" HeaderText="老师姓名" SortExpression="username1" />
                        <asp:BoundField DataField="gzdw" HeaderText="工作单位" SortExpression="gzdw" />
                        <asp:BoundField DataField="jigou" HeaderText="所属机构" SortExpression="jigou" />
                        <asp:BoundField DataField="city" HeaderText="所在城市" SortExpression="jigou" />
                        <asp:TemplateField HeaderText="个人简介">
                            <ItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server" Height="139px" Text='<%# Eval("grjj") %>'
                                    TextMode="MultiLine" Width="489px"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Fields>
                </asp:DetailsView>
            </td>
        </tr>      
        <tr>
            <td style="width: 7809px">
            </td>
            <td style="width: 568px">
                <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT DISTINCT [jigou] FROM [account] WHERE (([role] = @role1) OR ([role] = @role2))">
                    <SelectParameters>
                        <asp:Parameter DefaultValue="机构" Name="role1" Type="String" />
                        <asp:Parameter DefaultValue="管理员" Name="role2" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT [username1], [id] FROM [account] WHERE (([jigou] = @jigou) AND ([role] = @role))">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList1" Name="jigou" PropertyName="SelectedValue"
                            Type="String" />
                        <asp:Parameter DefaultValue="老师" Name="role" Type="String" />
                    </SelectParameters>
                </asp:SqlDataSource>
                <asp:SqlDataSource ID="SqlDataSource3" runat="server" ConnectionString="<%$ ConnectionStrings:gConnectionString %>"
                    SelectCommand="SELECT [id],[city],[username1], [grjj], [gzdw], [jigou],[email],[mobile] FROM [account] WHERE ([id] = @id)">
                    <SelectParameters>
                        <asp:ControlParameter ControlID="DropDownList2" Name="id" PropertyName="SelectedValue"
                            Type="Int64" />
                    </SelectParameters>
                </asp:SqlDataSource>
            </td>
        </tr>
    </table>
    </form>
</body>
</html>
